<div class="leftBox">

<h2>Events</h2>

	<table class="listTable">
	
	   <thead>
		    <tr>
		   		<th>Event Name</th>
		   		<th>Event Info</th>
		   	</tr>
	   </thead>

<?php foreach( $allEvents->result() as $event ): ?>
	   
	   <tbody>
			<tr>
				<td><?php echo anchor('events/show/event_id/'.$event->id, $event->event_name) ?></td>
				<td><?php echo $event->event_info ?></td>
		    </tr>
	   </tbody>
		


<?php endforeach; ?>

		</table>

</div>

<div id="rightBoxDiv">
		<?php $ci =& get_instance(); ?>
		<?php if($ci->session->userdata('DX_role_id') == 1):  ?>
			<div class="rightBox">
				<h2>Admin Functions</h2>
				<ul>
					<li><?php echo anchor('events/newEvent', 'Add new event') ?></li>
				</ul>
			</div>
		<?php endif; ?>

</div>